home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / dos_win / winsock / packages / powertcp.exe / CONNECT.FR_ / CONNECT.bin (.txt)
Encoding:
Visual Basic Form  |  1994-11-13  |  6.0 KB  |  176 lines

  1. VERSION 2.00
  2. Begin Form frmConnect 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "Connect"
  5.    ClientHeight    =   1920
  6.    ClientLeft      =   2115
  7.    ClientTop       =   4170
  8.    ClientWidth     =   3240
  9.    ClipControls    =   0   'False
  10.    Height          =   2325
  11.    Left            =   2055
  12.    LinkTopic       =   "Form3"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   1920
  16.    ScaleWidth      =   3240
  17.    Top             =   3825
  18.    Width           =   3360
  19.    Begin TextBox txtHostName 
  20.       Height          =   300
  21.       Left            =   1200
  22.       TabIndex        =   1
  23.       Top             =   240
  24.       Width           =   1455
  25.    End
  26.    Begin CommandButton cmdCancel 
  27.       Cancel          =   -1  'True
  28.       Caption         =   "Cancel"
  29.       Height          =   375
  30.       Left            =   1800
  31.       TabIndex        =   5
  32.       Top             =   1200
  33.       Width           =   1215
  34.    End
  35.    Begin CommandButton cmdConnect 
  36.       Caption         =   "&Connect"
  37.       Default         =   -1  'True
  38.       Height          =   375
  39.       Left            =   240
  40.       TabIndex        =   4
  41.       Top             =   1200
  42.       Width           =   1215
  43.    End
  44.    Begin ComboBox cmbPort 
  45.       Height          =   300
  46.       Left            =   1200
  47.       TabIndex        =   3
  48.       Top             =   600
  49.       Width           =   1815
  50.    End
  51.    Begin Label Label2 
  52.       Caption         =   "Port:"
  53.       Height          =   495
  54.       Left            =   120
  55.       TabIndex        =   2
  56.       Top             =   600
  57.       Width           =   1215
  58.    End
  59.    Begin Label Label1 
  60.       Caption         =   "Host Name:"
  61.       Height          =   495
  62.       Left            =   120
  63.       TabIndex        =   0
  64.       Top             =   240
  65.       Width           =   1215
  66.    End
  67. ' TELNET Action Property values
  68. Const CONNECT = 0
  69. Const LISTEN = 1
  70. Const CLOSECOMM = 2
  71. Const ABORTCOMM = 3
  72. ' TELNET CommState Property Values
  73. Const CLOSED = 1
  74. Const CONNECTING = 2
  75. Const CONNECTED = 3
  76. Const LISTENING = 4
  77. Const CLOSING = 5
  78. ' TELNET commands
  79. Const GO_AHEAD_CMD = 249
  80. Const WILL_CMD = 251
  81. Const WONT_CMD = 252
  82. Const DO_CMD = 253
  83. Const DONT_CMD = 254
  84. Const SB_CMD = 250
  85. ' Telnet options
  86. ' NOTE: These are not all possible options. New options
  87. ' are currently being defined. This list contains many
  88. ' of the common ones you may use.
  89. Const BINARY_TRANSMISSION = 0
  90. Const ECHO = 1
  91. Const RECONNECTION = 2
  92. Const SUPPRESS_GO_AHEAD = 3
  93. Const MESSAGE_SIZE = 4
  94. Const STATUS = 5
  95. Const TIMING_MARK = 6
  96. Const REMOTE_CONTROLLED = 7
  97. Const OUTPUT_LINE_WIDTH = 8
  98. Const OUTPUT_PAGE_SIZE = 9
  99. Const OUTPUT_RETURN_DISPOS = 10
  100. Const OUTPUT_HORIZ_TABSTOPS = 11
  101. Const OUTPUT_HORIZ_TAB_DISPOS = 12
  102. Const OUTPUT_FORM_FEED_DISPOS = 13
  103. Const OUTPUT_VERT_TABSTOPS = 14
  104. Const OUTPUT_VERT_TAB_DISPOS = 15
  105. Const OUTPUT_LINE_FEED_DISPOS = 16
  106. Const EXTENDED_ASCII = 17
  107. Const LOGOUT = 18
  108. Const BYTE_MACRO = 19
  109. Const DATA_ENTRY_TERMINAL = 20
  110. Const SUPDUP = 21
  111. Const SUPDUP_OUTPUT = 22
  112. Const SEND_LOCATION = 23
  113. Const TERMINAL_TYPE = 24
  114. Const END_OF_RECORD = 25
  115. Const TACACS_USER_ID = 26
  116. Const OUTPUT_MARKING = 27
  117. Const TERMINAL_LOC_NUM = 28
  118. Const REGIME_3270 = 29
  119. Const X3_PAD = 30
  120. Const WINDOW_SIZE = 31
  121. ' TNT Error Values
  122. Const PT_OK = 0              '/* OK...ErrorDesc should be NULL                             */
  123. Const PT_HARDWARE = 1        '/* hardware failure                                          */
  124. Const PT_PROTOCOL = 2        '/* protocol software failure                                 */
  125. Const PT_BADNAME = 3         '/* name of host cannot be resolved to address                */
  126. Const PT_CONNREFUSED = 4     '/* connection to host refused                                */
  127. Const PT_NOROUTE = 5         '/* no route to host (check network part of address)          */
  128. Const PT_NOHOST = 6          '/* remote host is not available (check host part of address) */
  129. Const PT_NOMEM = 7           '/* insufficient resources to accept buffer or create channel */
  130. Const PT_ADDRINUSE = 8       '/* address/port in use                                       */
  131. Const PT_ALREADYOPEN = 9     '/* PowerTCP daemon/session already open                      */
  132. Const PT_CLOSED = 10         '/* graceful close by remote host or us                       */
  133. Const PT_ABORTED = 11        '/* connection aborted by remote host or us                   */
  134. Const PT_NOTOPEN = 12        '/* attempt made to use a closed session                      */
  135. Const PT_NODEVLICENSE = 13   '/* not licensed for development (fatal error)                */
  136. Const PT_NORTLICENSE = 14    '/* not licensed for runtime (non-fatal error)                */
  137. Const PT_SOFTWARE = 15       '/* general software error                                    */
  138. Const PT_WARNING = 16        '/* general warning                                           */
  139. Const PT_ERROR = 17          '/* general error                                             */
  140. Sub cmdCancel_Click ()
  141.     Me.Hide
  142. End Sub
  143. Sub cmdConnect_Click ()
  144.     Me.Hide
  145.     ' Select from the different standard telnet ports
  146.     Select Case cmbPort
  147.     Case "telnet"
  148.         ' Standard telnet
  149.         frmTelnet.TNT1.RemotePort = 23
  150.     Case "echo"
  151.         ' Echos back whatever is sent
  152.         frmTelnet.TNT1.RemotePort = 7
  153.     Case "discard"
  154.         ' Does not echo back what is sent
  155.         frmTelnet.TNT1.RemotePort = 9
  156.     Case "daytime"
  157.         ' Returns the date and time
  158.         frmTelnet.TNT1.RemotePort = 13
  159.     Case "chargen"
  160.         ' Generates a stream of characters
  161.         frmTelnet.TNT1.RemotePort = 19
  162.     Case Else
  163.         frmTelnet.TNT1.RemotePort = Val(cmbPort)
  164.     End Select
  165.     frmTelnet.TNT1.RemoteHost = txtHostName
  166.     frmTelnet.TNT1.Action = CONNECT
  167. End Sub
  168. Sub Form_Load ()
  169.     cmbPort.AddItem "telnet"
  170.     cmbPort.AddItem "echo"
  171.     cmbPort.AddItem "discard"
  172.     cmbPort.AddItem "daytime"
  173.     cmbPort.AddItem "chargen"
  174.     cmbPort.ListIndex = 0
  175. End Sub
  176.